<?php
use PsiFramework\Classes\Util\UI\Printer;

$messages = $response->getAttribute('messages');
?>
<h1>Inbox</h1>
<div id="inbox">
    <div id="inboxMenu">
        <ul>
            <li>Inbox</li>
            <li>New</li>
        </ul>
    </div>
    <div id="messages">
    <?php
    foreach ($messages as $conversationId=>$conversation) {
        echo '<h3>conversation "'.$conversationId.'"</h3>';
        echo '<ul>';
        foreach ($conversation as $message) {
            echo '<li>';
            Printer::debug($message);
            echo '</li>';
        }
        echo '</ul>';
    }
    ?>
    </div>
</div>
